<template>
    <div style="padding: 16px">
        <el-carousel height="400px" :autoplay="false" trigger="click" indicator-position="none" arrow="always" loop
            :initial-index="initialIndex">
            <el-carousel-item v-for="(file, index) in fileList" :key="index + 'previewImg'">
                <img width="100%" height="100%" :src="file.url" />
            </el-carousel-item>
        </el-carousel>
    </div>
</template>

<script setup lang="ts">
import { defineProps } from 'vue'
const props = defineProps({
    fileList: {
        type: <any>[],
        default: () => {
            return []
        }
    },
    initialIndex: {
        type: Number,
        default: 0
    }
})
console.log('props: ', props);
</script>

<style lang="less" scoped>
img {
    object-fit: contain;
}
</style>